﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Reporting.WinForms;
namespace QuanLyKhachSan
{
    public partial class frm_thuephong : Form
    {
        public frm_thuephong()
        {
            InitializeComponent();
        }

        private void frm_thuephong_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'PhieuThuePhong3.ThuePhong' table. You can move, or remove it, as needed.
            this.ThuePhongTableAdapter.Fill(this.PhieuThuePhong3.ThuePhong);

            this.reportViewer1.RefreshReport();
        }

        private void btnChon_Click(object sender, EventArgs e)
        {
            //lấy tên người lập danh sách
            string NguoiLap = txtNguoiLap.Text;
            //tạo parameter để add vào report
            IList<ReportParameter> param = new List<ReportParameter>();
            //thêm người lập danh sách
            param.Add(new ReportParameter("NguoiLap", NguoiLap));
            //set parameter cho report
           reportViewer1.LocalReport.SetParameters(param);
           reportViewer1.RefreshReport();
        }
    }
}
